<!---->
<template>
  <div class="keyLineWG">
    <div class="block" v-if="tableData.length>0">
      <el-timeline>
        <el-timeline-item v-for="(item,index) in tableData" :key="index" :type="item.action=='1'?'success':'info'" :timestamp="item.processNodeStr" placement="top">
          <el-card>
            <h4>审核意见：{{item.action}}</h4>
            <p>进入时间：{{item.sendTime}}</p>
            <p>结束时间：{{item.endTime}}</p>
            <p>操作人：{{item.userName}}</p>
          </el-card>
        </el-timeline-item>
      </el-timeline>
    </div>
        <div v-else style="height: 60vh; text-align: center; padding-top: 20vh">
          <div style="margin-bottom: 10px">
            <img
              src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/DSF/50.png"
            />
          </div>
          <div>暂无数据</div>
        </div>
  </div>
</template>
<script>
  import { GetprocessList } from '../../utils/api'
  export default {
    data () {
      return {
        tableData: [
        ]
      }
    },
    mounted () {
      if (ZWJSBridge) {
        ZWJSBridge.setTitle({
          "title": "流程详情"
        }).then(res => {
        }).catch(err => {
        })
      }
    },
    methods: {
      getData: async function (data) {
        debugger
        const res = await GetprocessList(data);
        if(res.data&&res.data.data.length>0){
          this.tableData =res.data.data;
        }

      },
      onClickLeft () {
        this.$router.back(-1)
      }
    },
    mounted () {
      this.getData(this.$route.query.objtctNo)
    }
  }
</script>
<style lang="scss" scoped>
  .keyLine {
    height: 100vh;
    background: #fff;
    font-size: 0.2em;
    font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;
    .title {
      width: 100%;
      height: 50px;
      background: #007aff;
      line-height: 50px;
      text-align: center;
      color: #ffffff;
      font-size: 20px;
      position: relative;
    }
    .block {
      // height: calc(100vh - 50px);
      overflow: auto;
      padding: 4px;
    }
  }
</style>
